package be.dch.gui;

import java.awt.Dimension;

import javax.swing.JComponent;

public final class SwingUtils {

    private SwingUtils() {
	// Utility class no default constructor needed
    }

    /**
     * Helper method to fix the dimension of a component.
     * 
     * @param c
     * @param width
     * @param height
     */
    public static void setFixedDimensions(final JComponent comp, final int width, final int height) {
	comp.setPreferredSize(new Dimension(width, height));
	comp.setSize(comp.getPreferredSize());
	comp.setMaximumSize(comp.getPreferredSize());
	comp.setMinimumSize(comp.getPreferredSize());
    }

}
